require './path'

Koa = require('koa')

module.exports = (next)->

    app = new Koa()
    next app
    app.use require('./raise')

    app.use require('koa-bodyparser')(
        enableTypes:'json form text'.split(' ')
    )

    require('./url')(app)
